select rows with nan pandas

35

df[df['column name'].isna()]
df[df.isnull().any(axis=1)]
df[df['Col2'].isnull()]
 np.count_nonzero(df.isnull().values)   
 np.count_nonzero(df.isnull())           # also works  
# Try using a loc instead of a where:
df_sub = df.loc[df.yourcolumn == 'yourvalue']

Comments

Submit
0 Comments